package com.nondo.rdp.auth.domain;

import com.nondo.rdp.core.domain.base.BaseEntity;

import javax.persistence.*;
import java.util.Date;

/**
 * 用户邀请注册日志
 */
@Entity
@Table(name = "sys_user_invite_register_log")
public class inviteRegisterLog extends BaseEntity {
    private Long id;    //自增ID
    private User user;   //用户
    private User inviter; //邀请人，如果不是邀请人则为空
    private String message;//展示的消息
    private Date createdTime; //创建时间

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "uid")
    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "inviterId")
    public User getInviter() {
        return inviter;
    }

    public void setInviter(User inviter) {
        this.inviter = inviter;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }
}
